package com.prs.crm.report;

import java.util.Collection;

import javax.servlet.http.HttpServletRequest;

import org.jfree.data.general.AbstractDataset;

import com.prs.crm.domain.crm.Customer;
import com.prs.crm.domain.hr.Person;

public interface ChartService {
	/**
	 * PieChart
	 * */
	public ChartResult export(AbstractDataset dataset, String title, String hoturl);
	/**
	 * BarChart
	 * */
	public ChartResult export(AbstractDataset dataset, String title, String leftTitle, String type, String hotUrl);
	/**
	 * LineChart
	 * */
	public ChartResult exportLineChart(AbstractDataset dataset, String title, String leftTitle, String type, String hotUrl);
	/**
	 * 填充数据源
	 * */
	public AbstractDataset fillDataset(Collection<Object[]> dataList, int GraphicsType);
	
	AbstractDataset fillLineChartSouce(Collection<?> dataSouce, Integer type, int chartType, String oldYear, String month);
	
	AbstractDataset fillCustomerAddLine(Collection<Customer> dataSouce, Integer type, String oldYear, String month, int chartType, String singleKey);
	
	
	public Collection<Person> convertIdsToPersons(Collection<Integer> ids);
	public Integer getWidth();
	public void setWidth(Integer width);
	public Integer getHeight();
	public void setHeight(Integer height);
	public HttpServletRequest getRequest();
	public Person getPerson(String series);
	
}
